$.extend({
		DateUtil	:	{
			toDate : function(dateStr, pattern) {
				var splitStr = dateStr.split('-');
				var year = splitStr[0];
				var month = splitStr[1];
				var day = splitStr[2];
				
				return new Date(year, month - 1, day);
			},
			toString : function(dateStr, pattern) {
				
			},
			isValid : function(dateStr, pattern) {
				var splitStr = dateStr.split(' ');

				var dateStr = splitStr[0].split('-');
				var year = dateStr[0];
				var month = dateStr[1];
				var day = dateStr[2];

				var timeStr = splitStr[1].split(':');
				var hour = timeStr[0];
				var minute = timeStr[1];

				// ------------------- 判断日期 -------------------
				// 判断月份
				if(month > 12 || month < 1) {
					return false;
				}

				// 判断天数
				var isLeapYear = false;
				if((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {
					isLeapYear = true;
				}
				var maxDay = 1;
				if(month == 2) {
					isLeapYear ? maxDay = 29 : maxDay = 28;
				} else {
					if(month % 2 == 1) {
						month < 8 ? maxDay = 31 : maxDay = 30;
					} else {
						month < 8 ? maxDay = 30 : maxDay = 31;
					}
				}
				if(day < 1 || day > maxDay) {
					return false;
				}

				// ------------------- 判断时间 -------------------
				// 判断小时
				if(hour > 23) {
					return false;
				}
				// 判断分钟
				if(minute > 59) {
					return false;
				}

				return true;
			}
		}
	});